FROM centos:7
#安装redis的c语言环境,
RUN  ["yum","install","-y","gcc","gcc-c++","net-tools","make"]
#进入工作目录
WORKDIR  /usr/local
#添加redis安装包并解压到当前目录
ADD redis-5.0.8.tar.gz .
#切换到src目录
WORKDIR  /usr/local/redis-5.0.8/src
#开始编译,安装redis
RUN  make && make install
#进入到redis目录下
WORKDIR /usr/local/redis-5.0.8
#添加或者拷贝redis.conf文件为redis-7000.conf文件到当前目录
ADD  redis-7000.conf .
#暴露端口
EXPOSE  7000
#使用redis-server启动redis服务
CMD ["redis-server","redis-7000.conf"]

MAINTAINER  zaicheng

ADD  run/zaicheng /zai

COPY  /zaicheng/add  /nginx/cai

RUN /

WORKDIR /usr/zaicheng

ENV dev dev

EXPOSE 8080

VOLUME //

ENTRYPOINT ["ps"]